﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WcfTwitterChatService
{
    public class ChannelDTO
    {
        public int ID { get; set; }
        public string ChannelName { get; set; }

        public static ChannelDTO CreateFromChannel(Channel channel)
        {
            ChannelDTO chanellDTO = new ChannelDTO();
            chanellDTO.ID = channel.ID;
            chanellDTO.ChannelName = channel.Name;
            return chanellDTO;
        }

        public Channel ToChannel()
        {
            Channel channel = new Channel();
            channel.ID = this.ID;
            channel.Name = this.ChannelName;
            return channel;
        }
    }
}